<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        const fn =()=>{
            const arr = []
            arr[10000] = 1
        }
        // 循环调用promise的错误演示

        const promise = new Promise((resolve,reject)=>{
            resolve(1)
        })
        const p1 = promise.then(value=>{
            console.log(value)
            return p1
        })
        p1.then(()=>{}, error=>console.log(error))
    </script>
</body>
</html>